<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title><?php echo config_item('website_gasstation_title')?></title>
<link rel="shortcut icon" href="<?php echo base_url()?>public/images/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- basic styles -->
<link rel="stylesheet" href="<?php echo base_url()?>themes/gasstation/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="<?php echo base_url()?>themes/gasstation/css/css.css" />
<link rel="stylesheet" href="<?php echo base_url()?>themes/gasstation/layui/css/layui.css" />
<script type="text/javascript" src="<?php echo base_url()?>themes/gasstation/layui/layui.js" ></script>
<script type="text/javascript" src="<?php echo base_url()?>themes/gasstation/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>themes/gasstation/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>public/js/validform.js"></script>
<script type="text/javascript">

$(document).ready(function () {
	setInterval(doTTS,3000);
});
function doTTS(){
	var base_url = '<?php echo base_url();?>';
	$.ajax( {
        url:'<?php echo site_url("gasstation/index/get_audio")?>',
        data:{},
        type:'post',
        cache:false,
        dataType:'json',    
        success:function(data) {
            if(data['code'] == 0){
            	var ttsDiv = document.getElementById('bdtts_div_id');
            	var ttsAudio = document.getElementById('tts_autio_id');
            	var ttsText = data['audio_text'];
            	ttsDiv.removeChild(ttsAudio);
            	var au1 = '<audio id="tts_autio_id" autoplay="autoplay">';
            	var sss = '<source id="tts_source_id" src="http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=3&text='+ttsText+'" type="audio/mpeg">';
            	var eee = '<embed id="tts_embed_id" height="0" width="0" src="">';
            	var au2 = '</audio>';
            	ttsDiv.innerHTML = au1 + sss + eee + au2;
            	
            	ttsAudio = document.getElementById('tts_autio_id');
            	ttsAudio.play();
            } else {
            	
            }
        },
        error : function() {       
        
        }
	});
}



</script>
</head>
<body>
<header>
	<div class="head_left">
		<a href="<?php echo site_url("gasstation/index") ?>">
			<img src="<?php echo base_url()?>themes/gasstation/images/logo.png" />
		</a>
	</div>
	<div class="head_right">
		<div class="gas_station" >
			
			   <div class="layui-form-item">
			    <label class="layui-form-label gas">
			    	<img src="<?php echo base_url()?>themes/gasstation/images/gas.png"  />
			    </label>
			    <div class="layui-input-block box" style="width: auto;">
			      <select name="city" id="city" lay-verify="required" onchange="window.location.href='<?php echo site_url().'gasstation/index/index/gid/';?>'+$(this).val()" style=" height:25px; margin-top:8px;">
			        
                   
                   <?php if($_SESSION['GASSTATION_USER_NAME']=='gongxiao'):?>
                   		<?php foreach($oil_station as $row):?>
	                   		<option value="<?php echo $row['id']?>" <?php if($_SESSION['GASSTATION_ID']==$row['id']):?> selected <?php endif;?>><?php echo $row['gasstation_name']?></option>
	                   	<?php endforeach?>
                    <?php elseif($_SESSION['GASSTATION_USER_NAME']=='risheng'):?>
                    	<option value="35" <?php if($_SESSION['GASSTATION_ID']==35):?> selected <?php endif;?>>中海日升黄务加油站</option>
                        <option value="36" <?php if($_SESSION['GASSTATION_ID']==36):?> selected <?php endif;?>>中海日升开发区加油站

</option>
                    <?php else:?>
                    	<option value=""><?php echo $_SESSION['GASSTATION_NAME']?></option>
					<?php endif;?>
			      </select>
			    </div>
			  </div>
			
		</div>
		
		<div class="news">
			<a href="#">
				<img src="<?php if (isset($_SESSION['GASSTATION_HEADPIC'])&&$_SESSION['GASSTATION_HEADPIC']!="")echo $_SESSION['GASSTATION_HEADPIC']; else echo base_url().'themes/gasstation/avatars/user.jpg';?>"  />
			</a>
		</div>
		<div class="user">
			<ul class="layui-nav">
			  <li class="layui-nav-item">
			    <a href="javascript:;" class="name"><?php echo $_SESSION['GASSTATION_USER_NAME']?></a>
			    <dl class="layui-nav-child"> <!-- 二级菜单 -->
			      <dd><a href="<?php echo site_url("gasstation/index/logout")?>">退出</a></dd>
			    </dl>
			  </li>
			</ul>
			<p><?php echo $_SESSION['GASSTATION_ROLE_NAME']?></p>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
			<div id="bdtts_div_id">
			<audio id="tts_autio_id" autoplay="autoplay" hidden="true">
				<source id="tts_source_id" src="" type="audio/mpeg">
				<embed id="tts_embed_id" height="0" width="0" src="">
			</audio>
		</div>
</header>
<div class="wrap">
